# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=ssh-honeypot
pkgver=113.4bda71c
pkgrel=1
pkgdesc='Fake sshd that logs ip addresses, usernames, and passwords.'
groups=('blackarch' 'blackarch-honeypot')
arch=('x86_64' 'aarch64')
url='https://github.com/droberson/ssh-honeypot'
license=('GPL3')
depends=('libssh' 'libpcap')
makedepends=('git' 'clang' 'make' 'json-c')
source=("git+https://github.com/droberson/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  make
}

package() {
  cd $pkgname

  install -Dm 755 "bin/$pkgname" "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

